#!/bin/bash

DST=$2
if [ ! -d $DST ];then
  mkdir -p $DST;
fi

SRC=$1;
echo "$SRC"
echo "$DST"
read OK;
if [[ $OK != "y" ]];then
  exit 0;
fi
for l in $SRC/*.pdf;do
    pdftotext "$l" "$DST/$(basename $l )"
done

# for l in $SRC/*.docx;do
#     docx2txt.pl "$l" "$DST/$(basename $l).txt"  
# done
